package com.haha.keymap.v1;

import java.awt.*;

/**
 * @author shenlinnan
 * @date 2025/7/13 21:38
 */
public class CustomColor {

    private int r;
    private int g;
    private int b;

    public int getR() {
        return r;
    }

    public void setR(int r) {
        this.r = r;
    }

    public int getG() {
        return g;
    }

    public void setG(int g) {
        this.g = g;
    }

    public int getB() {
        return b;
    }

    public void setB(int b) {
        this.b = b;
    }

    public boolean compare(Color color) {
        if (color == null) {
            return false;
        }
        return r == color.getRed() && g == color.getGreen() && b == color.getBlue();
    }

    @Override
    public String toString() {
        return "CustomColor{" +
                "r=" + r +
                ", g=" + g +
                ", b=" + b +
                '}';
    }
}
